-
Notifications
You must be signed in to change notification settings - Fork 15
feat: a precompile to get ciphertext bytes #90
Conversation
Resolves #75. |
1eb0838
to
3eb3802
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The FheLib documentation is perfect
We should have a gitbook preview but I don't find it... |
How can we add it? Should we do it as a part of a separate PR? |
normally it's automatic, I'll check. |
Ok it's now enabled, could you amend your last commit and force push to trigger it @dartdart26 |
Given a contract address and an ebool/euint value stored in it, return the underlying ciphertext. Returns an empty response if no such ciphertext exist. Only works via `eth_call`. The function selector for it, as of this commit, is `e4b808cb`. Move protected storage code into its own file. Add a `FheLib Library` section in the getting started doc section. Nit: rename `arg_types` to `argTypes` in instructions.go for naming consistency.
3eb3802
to
47a5982
Compare
@aquint-zama should we merge? |
Good work! I notice this precompile only returns the ciphertext bytes and no other metadata such as ciphertext type. @youben11 I think the oracle service needs this information; do you think it's possible and sufficient to get it from the oracle smart contract event? |
A somewhat hacky way of dealing with that is what we do in the cli tool - determine ciphertext type based on its size. I guess at some point the type should be part of its serialisation. If we want the type, we can append one byte at the beginning or the end. |
There has been a change in the events published by the oracle contract, which now specify the type, so the oracle should have this information. Now I'm not sure if this is necessarily enough. |
Given a contract address and an ebool/euint value stored in it, return the underlying ciphertext.
Returns an empty response if no such ciphertext exist. Only works via
eth_call
.The function selector for it, as of this commit, is
e4b808cb
.Move protected storage code into its own file.
Add a
FheLib Library
section in the getting started doc section.Nit: rename
arg_types
toargTypes
in instructions.go for naming consistency.